/*
 * Copyright 2013-2019 Xia Jun(3979434@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ***************************************************************************************
 *                                                                                     *
 *                        Website : http://www.farsunset.com                           *
 *                                                                                     *
 ***************************************************************************************
 */
package com.workcell.workdata.im.model.vo;

import com.workcell.workdata.im.entity.MicroServer;
import com.workcell.workdata.im.entity.MicroServerMenu;

import java.util.List;

/*
表情包
 */
public class MicroServerVO {
	private Long id;

	private String account;

	private String description;

	private String name;

	private String website;

	private String greet;

	private String webhook;

	private List<MicroServerMenu> menuList;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getGreet() {
		return greet;
	}

	public void setGreet(String greet) {
		this.greet = greet;
	}

	public String getWebhook() {
		return webhook;
	}

	public void setWebhook(String webhook) {
		this.webhook = webhook;
	}

	public List<MicroServerMenu> getMenuList() {
		return menuList;
	}

	public void setMenuList(List<MicroServerMenu> menuList) {
		this.menuList = menuList;
	}

	public static MicroServerVO of(MicroServer server){
		if (server == null){
			return null;
		}
		MicroServerVO vo = new MicroServerVO();
		vo.account = server.getAccount();
		vo.name = server.getName();
		vo.id = server.getId();
		vo.webhook = server.getWebhook();
		vo.website = server.getWebsite();
		vo.description = server.getDescription();
		vo.greet = server.getGreet();
		return vo;
	}
}
